function thebjk(term,type)
load hermitdata;

if(strcmp(type,'polychaos'))
for jj=1:term
    for kk=1:term
        bjk{jj}{kk}= @(x) hermitijk(1,jj,kk)+hermitijk(2,jj,kk)*x;
    end
end
elseif(strcmp(type,'determ'))
    for jj=1:term
        for kk=1:term
            bjk{jj}{kk}=@(x) hermitijk(1,jj,kk)+x-x;
        end
    end
elseif(strcmp(type,'naive'))
% bjk{1}{1}=@(x) x;   bjk{2}{1}=@(x) x;  bjk{3}{1}=@(x) 2*x;   bjk{4}{1}=@(x) 3*x; 
% 
% bjk{1}{2}=@(x) 2*x; bjk{2}{2}=@(x) x;  bjk{3}{2}=@(x) x;     bjk{4}{2}=@(x) 3*x;
% 
% bjk{1}{3}=@(x) 3*x; bjk{2}{3}=@(x) x;  bjk{3}{3}=@(x) 3*x;   bjk{4}{3}=@(x) 3*x;
% 
% bjk{1}{4}=@(x) 2*x; bjk{2}{4}=@(x) x;  bjk{3}{4}=@(x) 2*x;   bjk{4}{4}=@(x) 2*x;
bjk{1}{1}=@(x) 7*x+1; bjk{2}{1}=@(x) 6*x;  bjk{3}{1}=@(x) 5*x;   bjk{4}{1}=@(x) 4*x; 

bjk{1}{2}=@(x) 6*x; bjk{2}{2}=@(x) 3*x;  bjk{3}{2}=@(x) 7*x;   bjk{4}{2}=@(x) 5*x;

bjk{1}{3}=@(x) 5*x; bjk{2}{3}=@(x) 8*x;  bjk{3}{3}=@(x) 11*x;   bjk{4}{3}=@(x) 10*x;

bjk{1}{4}=@(x) 1*x; bjk{2}{4}=@(x) 2*x;  bjk{3}{4}=@(x) 3*x;   bjk{4}{4}=@(x) 4*x;
end
fname='funcbjk';
save(fname,'bjk');